Repository navigation
Feedback forms: tab capture for the marked screenshot and the recording (Gleap #228450) - #214
Merged
Merged
Conversation
…ng (Gleap #228450) The form's capture step now uses the capture requests' method: - "Mark the bug": Next takes one frame of the current tab, drawings included (desktop Chromium, one click in the browser's share dialog). The image is uploaded and sent as screenshotUrl. Where the tab can't be captured (other browsers, a frame, webScreenshotMethod "dom-only"), or it is declined or fails, the report renders the DOM on the server as before. - "Record screen": GleapScreenRecorder runs on DisplayRecording and requestDisplayStream (current tab first on Chromium, MP4/WebM with a seekable duration) instead of its own MediaRecorder code. Reports sent without marking, and silent reports, keep the DOM render: they have no click on the page that could ask for the tab. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gleap ticket: #228450 Use web recording api everywhere
Problem
Capture requests take screenshots and recordings from the current tab (
getDisplayMediawithpreferCurrentTab). The feedback form's capture step still used the older ways: the screenshot was always a DOM snapshot rendered on the server, and the recording asked for the whole screen with its ownMediaRecordercode.Change
/uploads/sdkand the report carriesscreenshotUrl(as the mobile SDKs do), so no server change is needed. The same masks as in capture requests are painted over private fields.webScreenshotMethod: "dom-only"), or the share dialog is declined, or the capture or upload fails, the report sends the DOM snapshot as before.GleapScreenRecordernow runs onrequestDisplayStreamandDisplayRecordingfrom the capture requests (current tab first on Chromium, the browser's own picker elsewhere; MP4 or WebM with a seekable duration). Its own stream and recorder code is removed.canCaptureTab()(GleapCaptureSettings) andcaptureTabScreenshot()(GleapCaptureScreenshot) are used by both the capture requests and the form.Not changed
Checked
npx jest: 40 suites, 743 tests pass (new:GleapMarkerManager.test.js,GleapScreenRecorder.test.js, tab-screenshot cases inGleapFeedback.test.js).npx webpackbuilds.getDisplayMediainside the click with the tab options; with sharing denied the form opens and the drawing stays for the DOM render.🤖 Generated with Claude Code